for (b = 1; b <= (int)*flist; b++) if (MA_GetIndex(flist[b]))
for (mail = flist[b]->Messages; mail; mail = mail->Next)
if (mail->cMsgID) if (mail->cMsgID == irtid) { free(flist); return mail; }
free(flist);
}
return NULL;
}
///
/// RE_GetAnswer
// Find next message in a thread
struct Mail *RE_GetAnswer(long id)
{
struct Folder **flist;
struct Mail *mail;
int b;
if (id) if (flist = FO_CreateList())
{
for (b = 1; b <= (int)*flist; b++) if (MA_GetIndex(flist[b]))
for (mail = flist[b]->Messages; mail; mail = mail->Next)
if (mail->cIRTMsgID) if (mail->cIRTMsgID == id) { free(flist); return mail; }
free(flist);
}
return NULL;
}
///
/// RE_Follow
// Follows a thread in either direction
SAVEDS ASM void RE_Follow(REG(a1) int *arg)
{
int i, direction = arg[0], winnum = arg[1];
struct Folder **flist;
struct Mail *fmail = NULL;
BOOL allloaded = TRUE;
if (flist = FO_CreateList())
{
for (i = 1; i < (int)*flist; i++) if (flist[i]->LoadedMode != 2 && flist[i]->Type != FT_SEPARATOR) allloaded = FALSE;
free(flist);
}
if (!allloaded) if (!MUI_Request(G->App, G->RE[winnum]->GUI.WI, 0, GetStr(MSG_MA_ConfirmReq), GetStr(MSG_YesNoReq), GetStr(MSG_RE_FollowThreadReq))) return;
if (direction == -1) fmail = RE_GetQuestion(G->RE[winnum]->Mail.cIRTMsgID);
if (direction == 1) fmail = RE_GetAnswer (G->RE[winnum]->Mail.cMsgID);
void RE_SendMDN(int MDNtype, struct Mail *mail, struct Person *recipient, BOOL sendnow)
{
static char *MDNMessage[5] =
{
"The message written on %s to %s with subject \"%s\" has been displayed. This is no guarantee that the content has been read or understood.\n",
"The message written on %s to %s with subject \"%s\" has been sent somewhere %s, without being displayed to the user. The user may or may not see the message later.\n",
"The message written on %s to %s with subject \"%s\" has been processed %s, without being displayed to the user. The user may or may not see the message later.\n",
"The message written on %s to %s with subject \"%s\" has been deleted %s. The recipient may or may not have seen the message. The recipient may \"undelete\" the message at a later time and read the message.\n",
"%s doesn't wish to inform you about the disposition of your message written on %s with subject \"%s\".\n"
for (i = 0; i < 14; i++) SetupToolbar(&(data->GUI.TB_TOOLBAR[i]), tb_butt[i]?(tb_butt[i]==MSG_Space?"":GetStr(tb_butt[i])):NULL, tb_help[i]?GetStr(tb_help[i]):NULL, 0);